package com.etoak.service.impl;

import com.etoak.entity.User;
import com.etoak.mapper.UserMapper;
import com.etoak.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    UserMapper mapper;

    @Override
    public User getUser(int id) {
        return mapper.getById(id);
    }

    @Override
    public boolean addVisit(User user) {
        int i = mapper.addVisit(user);

        return i>0;
    }





}
